<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" @click="addCurrent" />
    {{current}}
  </div>
</template>

<script>
// import { ref, reactive, computed, watch, onMounted } from 'vue'
import { ref, onMounted } from 'vue'
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'Home',
  components: {
    HelloWorld
  },
  setup(props, context) {
    let current = ref(1)

    onMounted(() => {
      console.log(current);

    })
    return { current }
  },
  methods: {
    addCurrent() {
      this.current++
    }
  }
}
</script>
